/**
 *******************************************************************************
 * @FileName  : crc.h
 * @Author    : GaoQiu
 * @CreateDate: 2020-05-18
 * @Copyright : Copyright(C) GaoQiu
 *              All Rights Reserved.
 *******************************************************************************
 *
 * The information contained herein is confidential and proprietary property of
 * GaoQiu and is available under the terms of Commercial License Agreement
 * between GaoQiu and the licensee in separate contract or the terms described
 * here-in.
 *
 * This heading MUST NOT be removed from this file.
 *
 * Licensees are granted free, non-transferable use of the information in this
 * file under Mutual Non-Disclosure Agreement. NO WARRENTY of ANY KIND is provided.
 *
 *******************************************************************************
 */
#ifndef CRC_H_
#define CRC_H_

#include "defs_types.h"

uint8_t crc4_itu(uint8_t *data, uint32_t length);

uint8_t crc5_epc(uint8_t *data, uint32_t length);

uint8_t crc5_itu(uint8_t *data, uint32_t length);

uint8_t crc5_usb(uint8_t *data, uint32_t length);

uint8_t crc6_itu(uint8_t *data, uint32_t length);

uint8_t crc7_mmc(uint8_t *data, uint32_t length);

uint8_t crc8(uint8_t *data, uint32_t length);

uint8_t crc8_itu(uint8_t *data, uint32_t length);

uint8_t crc8_rohc(uint8_t *data, uint32_t length);

uint8_t crc8_maxim(uint8_t *data, uint32_t length);//DS18B20

uint16_t crc16_ibm(uint8_t *data, uint32_t length);

uint16_t crc16_maxim(uint8_t *data, uint32_t length);

uint16_t crc16_usb(uint8_t *data, uint32_t length);

uint16_t crc16_modbus(uint8_t *data, uint32_t length);

uint16_t crc16_ccitt(uint8_t *data, uint32_t length);

uint16_t crc16_ccitt_false(uint8_t *data, uint32_t length);

uint16_t crc16_x25(uint8_t *data, uint32_t length);

uint16_t crc16_xmodem(uint8_t *data, uint32_t length);

uint16_t crc16_dnp(uint8_t *data, uint32_t length);

uint32_t crc32(uint8_t *data, uint32_t length);

uint32_t crc32_mpeg_2(uint8_t *data, uint32_t length);

#endif /* CRC_H_ */
